package com.example.demo.admin.gecco.crawler.mzt;

import com.example.demo.admin.gecco.entity.CategoryType;
import com.geccocrawler.gecco.annotation.*;
import com.geccocrawler.gecco.request.HttpRequest;
import com.geccocrawler.gecco.spider.HtmlBean;

import java.util.List;


@Gecco(matchUrl = "https://www.797ii.com/htm/piclist{type}/{currPage}.html", pipelines = {"saveCategoryPipeline" },downloader = "myClientDownloader")
public class SecondPage implements HtmlBean {

    @Request
    private HttpRequest request;

    @RequestParameter
    private int currPage;

    @RequestParameter
    private int type;

    @Href
    @HtmlField(cssPath = ".pageList > a:eq(10)")
    private String lastPageUrl;

    @HtmlField(cssPath = ".mainArea > ul > li")
    private List<CategoryType> categoryTypes;

    public HttpRequest getRequest() {
        return request;
    }

    public void setRequest(HttpRequest request) {
        this.request = request;
    }

    public int getCurrPage() {
        return currPage;
    }

    public void setCurrPage(int currPage) {
        this.currPage = currPage;
    }

    public String getLastPageUrl() {
        return lastPageUrl;
    }

    public void setLastPageUrl(String lastPageUrl) {
        this.lastPageUrl = lastPageUrl;
    }

    public List<CategoryType> getCategoryTypes() {
        return categoryTypes;
    }

    public void setCategoryTypes(List<CategoryType> categoryTypes) {
        this.categoryTypes = categoryTypes;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }
}